package {
	import flash.display.Sprite;
	import flash.events.Event;
	import rule.IObserver;
	import rule.ISubject;
	import toUse.CurrCondDisp;
	import toUse.WeatherData;
	
	/**
	 * ...
	 * @author wibrst@qq.com
	 */
	public class Main extends Sprite {
		
		public function Main():void {
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void {
			removeEventListener(Event.ADDED_TO_STAGE, init);
			// entry point
			
			var weatData:WeatherData = new WeatherData;
			var currCondDisp:IObserver = new CurrCondDisp( weatData );
			
			weatData.simulateChange( 19, 30, 1000 );
			weatData.simulateChange( 16, 59, 1000 );
			weatData.simulateChange( 17, 46, 1000 );
		}
		
	}
	
}